package com.consumerService.module.service.impl;

import com.consumerService.module.feignClient.ProviderServiceClient;
import com.consumerService.module.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private ProviderServiceClient providerServiceClient;

    @Override
    public Map<String, Object> getMapInfo(Integer id) {
        Map<String,Object> map = new HashMap<>();
        map.put("a","1");
        map.put("b","1");
        map.put("c","1");
//        return map;
        return providerServiceClient.getByFeignClient(id);
    }

    @Override
    public Map<String, Object> postMapInfo(Map<String,Object> params) {
        return providerServiceClient.postByFeignClient(params);
//        return null;
    }
}
